package com.zy.Conterller;


import com.zy.service.CustomerService;
import com.zy.vo.CustomerVo;
import com.zy.vo.ResultVo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/customer")
public class CustomerController {

    @Resource
    private CustomerService customerService;
    @RequiresPermissions("customer:list")
    @GetMapping("/pagelist/{pageSize}/{pageNo}")
    public ResultVo getCustomerList(@PathVariable Integer pageSize, @PathVariable Integer pageNo, CustomerVo customerVo){
        return ResultVo.success(customerService.getPage(pageNo,pageSize,customerVo));
    }


}
